<include file="float/themes/web/Float/header.html" />

<div class="mode">
         <div>已绑定方式</div>
        <div class="bandWay">
            <div class="sj">
                <div>手机<span class="blue">{$userdata.mobile}</span></div>
                <div>
                    <div class="ybd show" style="line-height:40px;color:red">
                    	<b style="font-weight:normal">解绑</b><a href="#"><img src="__PUBLIC__/float/images/forward.png"></a>
                    </div>
                    <div class="wbd">
                        <span>未绑定</span>
                    </div>
                </div>
            </div>
            <div class="yx">
                <div>邮箱<span class="blue">{$userdata.email}</span></div>
                <div>
                    <div class="ybd show" style="line-height:40px;color:red">
                       <b style="font-weight:normal">解绑</b><a href="#"><img src="__PUBLIC__/float/images/forward.png"></a>
                    </div>
                    <div class="wbd show">
                        <span>未绑定</span>
                    </div>
                </div>
            </div>

        </div>

         <div><a href="{:U('Help/index')}"  class="blue">点此联系客服</a></div>
</div>
</body>
<script src="__PUBLIC__/float/js/main.js"></script>
<script>
    var divs=document.querySelectorAll(".bandWay>div");
    for(var i=0;i < divs.length;i++){
        divs[i].onclick=function(){
            if(this.className=="sj"){
                if(document.querySelectorAll(".bandWay>div:first-child>div:first-child>span")[0].innerHTML){
                    window.location.href="{:U('Binding/mobile_verify')}";
                }else{
                    window.location.href="{:U('Binding/mobile_set')}";
                }
            }else if(this.className=="yx"){
                window.location.href="set_yx.html";
                if(document.querySelectorAll(".bandWay>div:nth-child(2)>div:first-child>span")[0].innerHTML){
                    window.location.href="{:U('Binding/email_verify')}";
                }else{
                    window.location.href="{:U('Binding/email_set')}";
                }
            }
        }
    }
    window.onload=function(){
        var div1=document.querySelectorAll(".bandWay>div>div:first-child>span");
        for(var i=0;i<div1.length;i++){
            if(div1[i].innerHTML){
            	div1[i].parentNode.nextElementSibling.firstElementChild.firstElementChild.style.display="inline-block";
                div1[i].parentNode.nextElementSibling.lastElementChild.style.display="none"
            }else{
            	div1[i].parentNode.nextElementSibling.firstElementChild.firstElementChild.style.display="none"
            }
        }

    }
</script>
 </html>
